{-# LANGUAGE TypeOperators              #-}
{-# OPTIONS -Wall #-}

--------------------------------------------------------------------------------
-- |
-- Module      :  Orca.Language.Gens
-- Copyright   :  (c) Stephen Tetley 2013
-- License     :  BSD3
--
-- Maintainer  :  stephen.tetley@gmail.com
-- Stability   :  unstable
-- Portability :  GHC
--
-- Orchestra gentables - bindable to variables via @ftgen@.
-- 
--------------------------------------------------------------------------------

module Orca.Language.Gens
  (

    module Orca.Language.GensRaw
  , Gen         -- re-export
  , ftgen       -- re-export

  , load_file
  , gen_sine   
  , gen_sinusoids
  ) where

import Orca.Language.GensBase
import Orca.Language.GensRaw
import Orca.Language.Prim
import Orca.Prim


-- Note - some /high level/ gens should probably be direct 
-- calls in the orchestra language and not use ftgen e.g. gen01

load_file :: IKA_Signal rate 
          => (String ::: rate) -> IString -> Orch TableIx
load_file varspec filecod = ftgen varspec 0 0 $ gen01 filecod 0 0 0


gen_sine :: IFloat -> Gen
gen_sine str = gen10 [str]

gen_sinusoids :: [IFloat] -> Gen
gen_sinusoids = gen10